#pragma once
#include<zookeeper/zookeeper.h>
#include<string>

//zookeeper 封装类
class ZkClient
{
public:
    ZkClient();
    ~ZkClient();
   
    //启动连接
    void Start();
    //创建znode结点
    void Create(const char* path,const char* data,int datalen,int state=0);
    //获取结点数据
    std::string GetData(const char* path);
private:
    //zk客户端句柄
    zhandle_t* _zhandle;
};

